<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>    
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
    
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">

    <title>SGI :: Sistema de Gesti&oacute;n de Ideas</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">

	<!-- Propios -->
	<script src="../js/jquery-1.7.2.min.js"></script>
	<link href="../css/css_global.css" rel="stylesheet">
	<script src="../js/app/js_global.js"></script>
	<script src="../js/app/idea/ini_idea.js"></script>	
	
	<%@ include file="../../includes/head_privado.jsp" %>
	
  </head>

  <body>

	<%@ include file="../../includes/menu.jsp" %>
	
	<div class="container-fluid">
      <div class="row-fluid">
        
        <%@ include file="../../includes/app_menu.jsp" %>
		
		<!-- AREA TRABAJO -->
		<div class="span9">
			<table border="0" width="100%" cellpadding="0" cellspacing="0">	
			
				<!-- Cabecera -->
				<tr>
					<td>
					
						<table width="100%" border="0" >
							<tr>
								<td style="padding-left:10px; padding-right:15px;width:30px;"><img src="<%=request.getContextPath() %>/img/mdl_idea.jpg" alt=""></td>
								<td>
									<h6 style="margin:0px;">Adm. de Ideas</h6>
									<h4 style="margin:0px;">Listado de Ideas</h4>
								</td>
								<td style="text-align:right;">
										
									<c:if test = "${PS_USUARIO.codTipoUsuario != 2}">								
									<div class="dv_img_boton" style="float:right;width:90px;">
										<a href="javascript:fn_asignarPermiso();" style="font-size: 11px;" role="button" data-toggle="modal">
											<img alt="" src="../img/ico_mdl_insDesembolso.gif" border="0" width="28px;" /><br />Asig. Permisos
										</a>
									</div>
									</c:if>
									
									<c:if test = "${PS_USUARIO.codTipoUsuario == 2}">
									<div class="dv_img_boton" style="float:right;width:90px;">
										<a href="javascript:fn_abreMntReunion();" style="font-size: 11px;" role="button" data-toggle="modal">
											<img alt="" src="../img/ico_acc_InsDesemboso.gif" border="0" width="30px;" /><br />Reg. Reuni&oacute;n
										</a>
									</div>
									</c:if>
										
									<c:if test = "${PS_USUARIO.codTipoUsuario == 3}">	
									<div class="dv_img_boton" style="float:right;width:90px;">
										<a href="javascript:fn_asignarAsesor();" style="font-size: 11px;" role="button" data-toggle="modal">
											<img alt="" src="../img/mdl_usuario.jpg" border="0" width="25px;" /><br />Asig. Asesor
										</a>
									</div>
									</c:if>
																	
								</td>
							</tr>
						</table>
					
					</td>				
				</tr>			
				<tr style="margin:0px;">
					<td><hr style="margin:5px;"/></td>				
				</tr>	
				
				<!-- BODY -->
				<tr>
					<td align="center">
						<br>
					
						<div class="dv_tituloForm">Filtros</div>
						
						<div class="dv_contenedorForm" style="margin-left:0px;" >
						
							<form action="<%=request.getContextPath() %>/mod_idea/inicio.html" method="get" class="form-inline" style="text-align:left;">
								<input type="hidden" name="hddCodIdea" id="hddCodIdea" value="">
								
								<label class="dv_labelForm">Dato</label>
								<input type="text" id="txtDato" name="txtDato" size="25" placeholder="[Ingrese un dato]" value="${HS_DATOS.HM_BEAN_IDEA.nom_titulo}">
								
								<label class="dv_labelForm">Estado</label>
								<select id="cmbEstado" name="cmbEstado">
									<option value="0">[-Seleccionar-]</option>
									<c:forEach items="${HS_DATOS.HM_LST_ESTADOS}" var="lst" varStatus="i">
										<option value="${lst.cod_estado}" <c:if test = "${HS_DATOS.HM_BEAN_IDEA.cod_estado == lst.cod_estado}">selected="selected"</c:if> >${lst.nom_estado}</option>
									</c:forEach>
								</select>
								
								<c:if test = "${PS_USUARIO.codTipoUsuario == 1}">
								<button class="btn" type="button" onclick="javascript:fn_nuevaIdea();">Nuevo</button>
								</c:if>
								<button class="btn" type="button" onclick="javascript:fn_limpiarBsq();">Limpiar</button>
								<button class="btn btn-primary" type="submit">Buscar</button>
							</form>
							
						</div>
						
						<br/>
						
						<div id="dv_ConfirmElimina" class="alert alert-block alert-error fade in" style="display:none; padding-bottom:3px; padding-top:3px;">							
							<p>
								Est&aacute; seguro que desea eliminar la idea?
								<a class="btn btn-mini btn-danger" href="javascript:fn_eliminarIdeaConfirm('S');">SI</a> 
								<a class="btn btn-mini" href="javascript:fn_eliminarIdeaConfirm('N');">NO</a>
							</p>
						</div> 
						
						<div id="dv_ConfirmOK" class="alert fade in" style="display:none; padding-bottom:3px; padding-top:3px;">	
								<button type="button" class="close" data-dismiss="alert">&times;</button>
								<input type="hidden" name="hddMensaje" id="hddMensaje" value="${HS_DATOS.HM_MSG_DESCRIPCION}">
								${HS_DATOS.HM_MSG_DESCRIPCION}													
						</div> 
						
						<div class="dv_contenedorForm" style="margin-left:0px;" >
						
							<table class="table table-striped table-hover">
								<thead>
									<tr>
										<th>_</th>
										<th>T&iacute;tulo</th>
										<th>Descripci&oacute;n</th>
										<th>Estado</th>
										<th style="text-align: center;">Opc.</th>
									</tr>
								</thead>
								<tbody>
								
								<c:forEach items="${HS_DATOS.HM_LST_IDEAS}" var="lst" varStatus="i">
									<tr>
										<td><input type="radio" id="rdbIdea" name="rdbIdea" onclick="javascript:fn_seleccionaIdea(${lst.cod_idea});"></td>
										<td>${lst.nom_titulo}</td>
										<td>${lst.des_descripcion}</td>
										<td>${lst.obj_estado.nom_estado}</td>
										<td style="width:150px;">
										
											<c:if test = "${PS_USUARIO.codTipoUsuario == 1}">
												<a href="javascript:fn_editarIdea(${lst.cod_idea});" style="font-size: 12px;">
													<img alt="" src="../img/ico_mdl_multa.gif" border="0" width="18" /> Editar 
												</a>
												| 
												<a href="javascript:fn_eliminarIdea(${lst.cod_idea}, ${lst.cod_estado});" style="font-size: 12px;">
													<img alt="" src="../img/ico_acc_eliminar.gif" border="0" width="18" /> Eliminar
												</a>
											</c:if>
											
										</td>
									</tr>
								</c:forEach>
									
								</tbody>
							</table>

						</div>
						
					</td>				
				</tr>	
				
			</table>
		</span>
	    <!-- FIN AREA TRABAJO -->
	    
</div>
</div>
</div>	   
 
   
   <%@ include file="../../includes/pie.jsp" %>

   
    <!-- Le javascript
    ================================================== -->
    <!-- Placed at the end of the document so the pages load faster -->
    <script src="../js/jquery.js"></script>
    <script src="../js/bootstrap-transition.js"></script>
    <script src="../js/bootstrap-alert.js"></script>
    <script src="../js/bootstrap-modal.js"></script>
    <script src="../js/bootstrap-dropdown.js"></script>
    <script src="../js/bootstrap-scrollspy.js"></script>
    <script src="../js/bootstrap-tab.js"></script>
    <script src="../js/bootstrap-tooltip.js"></script>
    <script src="../js/bootstrap-popover.js"></script>
    <script src="../js/bootstrap-button.js"></script>
    <script src="../js/bootstrap-collapse.js"></script>
    <script src="../js/bootstrap-carousel.js"></script>
    <script src="../js/bootstrap-typeahead.js"></script>
        
  </body>
</html>
